package com.jz.nacos.service.api;

import com.jz.commom.api.dto.response.CommonResult;
import com.jz.commom.api.interfaces.DubboTestService;
import com.jz.nacos.service.config.NacosConfig;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Date;

@DubboService(interfaceClass=DubboTestService.class)
@Component
public class DubboServiceTestImpl implements DubboTestService {

    @Autowired
    NacosConfig nacosConfig;

    @Override
    public CommonResult getPayment() {
        return CommonResult.success(nacosConfig.getMyfrom()+":"+nacosConfig.getYourname2()+":"+nacosConfig.getMyappname(),new Date());
    }
}
